/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author PR
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmNegotiation extends BasicModel<PmNegotiation> {
  djno?: string; // 洽商单编号
  projectno?: string; // 工程编号
  projectname?: string; // 工程名称
  designchangereasonid?: string; // 变更类型
  remarks?: string; // 变更原因
  createDate?: string; // 创建时间
  isinvolvisInvolvewatermeterewatermeter?: string; // 涉及水表
  backResult?: string; // 驳回原因
  backResultDate?: string; // 驳回时间
  backResultPerson?: string; // 驳回人
  checkResult?: string; // 审核结果
  errorContent?: string; // 接口错误返回信息
  isReject?: number; // 执行状态
  sendDate?: string; // 发出时间
  createBy?: string; // 发出人编码
  checkPerson?: string; // 审核人编码
  checkDate?: string; // 审核时间
  confirmdate?: string; // confirmdate
  dfile?: string; // dfile
  pmNegotiationMaterialList?: any[]; // 子表列表
}

export const pmNegotiationList = (params?: PmNegotiation | any) =>
  defHttp.get<PmNegotiation>({ url: adminPath + '/design/negoti/pmNegotiation/list', params });

export const pmNegotiationListData = (params?: PmNegotiation | any) =>
  defHttp.post<Page<PmNegotiation>>({ url: adminPath + '/design/negoti/pmNegotiation/listData', params });

export const pmNegotiationForm = (params?: PmNegotiation | any) =>
  defHttp.get<PmNegotiation>({ url: adminPath + '/design/negoti/pmNegotiation/form', params });

export const pmNegotiationSave = (params?: any, data?: PmNegotiation | any) =>
  defHttp.postJson<PmNegotiation>({ url: adminPath + '/design/negoti/pmNegotiation/save', params, data });

export const pmNegotiationDelete = (params?: PmNegotiation | any) =>
  defHttp.get<PmNegotiation>({ url: adminPath + '/design/negoti/pmNegotiation/delete', params });
